package it.polimi.traveldream.web;

import it.polimi.traveldream.ejb.dto.ProviderDTO;
import it.polimi.traveldream.ejb.eaos.ProviderManagerLocal;

import javax.ejb.EJB;
import javax.faces.bean.*;



@ManagedBean(name="providerbean")
@RequestScoped
public class ProviderBean {
	
	@EJB
	private ProviderManagerLocal providerManager;
	
	private ProviderDTO current;
	
	public ProviderBean(){
		current=new ProviderDTO();
	}
	public ProviderDTO getCurrent() {
		return current;
	}

	public void setCurrent(ProviderDTO current) {
		this.current = current;
	}
	
	
	public String addProvider(){
		providerManager.AddProvider(current);
		return null;
	}
}
